package com.CMS.server;

import java.util.List;

import com.CMS.client.PrivilegeViewService;
import com.CMS.server.dao.PrivilegeViewDao;
import com.CMS.server.domain.PrivilegeView;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;

public class RpcPath extends RemoteServiceServlet implements PrivilegeViewService{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1630897402830143120L;

	@Override
	public List<PrivilegeView> fetch() {
		PrivilegeViewDao dao =  new PrivilegeViewDao();
		return dao.getAll();
	}

	@Override
	public void create(PrivilegeView privilegio) {
		PrivilegeViewDao dao = new PrivilegeViewDao();
		dao.createEntity(privilegio);
	}

}
